/*
 * HermiteSurface.h
 *
 *  Created on: 9 Nov 2013
 *      Author: Patrick
 */

#ifndef HERMITESURFACE_H_
#define HERMITESURFACE_H_

namespace Engine {

struct HermiteSurfacePoint {
	Ogre::Vector3 position;
	Ogre::Vector3 horizontalTangent;
	Ogre::Vector3 verticalTangent;
	Ogre::Vector3 normal;
};

class HermiteSurface {
public:
	virtual ~HermiteSurface();
	HermiteSurface(int Xsize, int Ysize);

	bool getPosition(int i, int j, Ogre::Vector3& pos);
	void setPosition(int i, int j, Ogre::Vector3 pos);

	bool getVerticalTangent(int i, int j, Ogre::Vector3& pos);
	void setVerticalTangent(int i, int j, Ogre::Vector3 pos);

	bool getHorizontalTangent(int i, int j, Ogre::Vector3& pos);
	void setHorizontalTangent(int i, int j, Ogre::Vector3 pos);

	int getXsize();
	int getYsize();

private:

	int Xsize, Ysize;
	std::vector<std::vector<HermiteSurfacePoint> > surface;
};

} /* namespace Engine */

#endif /* HERMITESURFACE_H_ */
